[Merged by Bors] - refactor(NumberTheory): golf Mathlib/NumberTheory/PythagoreanTriples#38454
[Merged by Bors] - refactor(NumberTheory): golf Mathlib/NumberTheory/PythagoreanTriples#38454yuanyi-350 wants to merge 2 commits intoleanprover-community:masterfrom
Mathlib/NumberTheory/PythagoreanTriples#38454Conversation
PR summary e18244a4f1Import changes for modified filesNo significant changes to the import graph Import changes for all files
Declarations diffNo declarations were harmed in the making of this PR! 🐙 You can run this locally as follows## summary with just the declaration names:
./scripts/pr_summary/declarations_diff.sh <optional_commit>
## more verbose report:
./scripts/pr_summary/declarations_diff.sh long <optional_commit>The doc-module for No changes to technical debt.This script lives in the
|
|
I ran a profiler comparison for the changed declarations in this PR. Results (seconds):
Overall:
|
|
!bench |
|
Benchmark results for dcb553d against e18244a are in. No significant results found. @yuanyi-350
No significant changes detected. |
|
maintainer merge |
|
🚀 Pull request has been placed on the maintainer queue by MichaelStollBayreuth. |
Vierkantor
left a comment
There was a problem hiding this comment.
The benchmark results are positive, so:
bors r+
| simp only [hz, dvd_zero] | ||
| simp [h0, hz] |
There was a problem hiding this comment.
This change by itself would not be worth including. I have a weak preference towards simp at the end of tactic blocks so it is not a regression, but it is not much clearer either.
Since it is included in a set of good changes, it can lift along.
#38454) - simplifies the `Int.gcd x y = 0` branches in `gcd_dvd`, `normalize`, and `classified` using `Int.gcd_eq_zero_iff` - shortens the zero case in `normalize` to a direct `simpa` from `PythagoreanTriple.zero` Extracted from #38144 [](https://gitpod.io/from-referrer/)
|
Pull request successfully merged into master. Build succeeded:
|
Mathlib/NumberTheory/PythagoreanTriplesMathlib/NumberTheory/PythagoreanTriples
Int.gcd x y = 0branches ingcd_dvd,normalize, andclassifiedusingInt.gcd_eq_zero_iffnormalizeto a directsimpafromPythagoreanTriple.zeroExtracted from #38144